﻿using LimaLims.Core.Enum;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LimaLims.Core.Entity.Basic
{
    /// <summary>
    /// 供应商信息
    /// </summary>
    [Comment("供应商信息")]
    public class Supplier : DEntityTenant
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Comment("名称")]
        [Required, MaxLength(20)]
        public string Name { get; set; }

        /// <summary>
        /// 供应商等级 
        /// </summary>
        [Comment("供应商等级")]
        public SupplierLevel Level { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        [Comment("联系人")]
        [Required, MaxLength(20)]
        public string ContactName { get; set; }

        /// <summary>
        /// 联系地址
        /// </summary>
        [Comment("联系地址")]
        [MaxLength(100)]
        public string Address { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        [Comment("电话"), MaxLength(20)]
        public string Phone { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Comment("备注"), MaxLength(100)]
        public string Remark { get; set; }

        /// <summary>
        /// 物料集合
        /// </summary>
        public ICollection<Material> Materials { get; set; }
    }
}
